// pages/myPassword/myPassword.js
import Notify from '../../dist/notify/notify';
Page({
  data: {
    focus: true,
    password:''
  },
  formSubmit(e) {
    const new_password = e.detail.value.new_password;
    const confirm_password = e.detail.value.confirm_password;
    if (new_password === confirm_password) {
      // wx.request({
      //   url: '',
      //   data:{
      //     new_password: new_password,
      //   },
      //   success:function(res){
          Notify({
            text: '密码修改成功',
            duration: 2000,
            selector: '#van-notify',
            backgroundColor: '#21c7f4'
          });
      //   }
      // })
    } else {
      Notify({
        text: '密码不一致，请重新输入!',
        duration: 2000,
        selector: '#van-notify',
        backgroundColor: '#f44'
      });
    }
  },
})